<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<include file="Public/header"/>

</head>

<body>

<div id="wrapper">

	<include file="Public/left" />
	<div id="page-wrapper">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header"><a href="javascript:history.go(-1);" style="float:right;color:#000;">返回</a> 详情</h1>
			</div>
			<!-- /.col-lg-12 -->
		</div>
		<!-- /.row -->
		<div class="row">
			<div class="col-lg-5 col-md-7 col-sm-12">
				<div class="panel-body">
				<form method="post" action="" enctype="multipart/form-data">
					<input type="hidden" name="id" value="{$info['id']}"/>
					<div class="form-group">
						<label>邀请码：</label>
						<label>{$info['code']}</label>
					</div>
					<div class="form-group">
						<label>年费：</label>
						<label>
							<if condition="$info['paytime'] gt $pretime">
							<span style="color:green;">已交</span>
							<else/>
							<span style="color:red;">未交</span>
							</if>
						</label>
					</div>
					<if condition="$info['paytime']">
					<div class="form-group">
						<label>到期时间：</label>
						<label>
						{$dqtime|date="Y-m-d H:i:s",###}
						</label>
					</div>
					</if>
					<div class="form-group">
						<label>头像：</label>
						<label><img src="{$info['headimgurl']}" style="max-width:200px;"/></label>
					</div>
					<div class="form-group">
						<label>姓名：</label>
						<input class="form-control" name="nickname" value="{$info['nickname']}" >
					</div>
					<div class="form-group">
						<label>电话：</label>
						<input class="form-control" name="mobile" value="{$info['mobile']|echotel2}" >
					</div>
					<div class="form-group">
						<label>邮箱：</label>
						<input class="form-control" name="email" value="{$info['email']}" >
					</div>
					<div class="form-group">
						<label>微信号：</label>
						<input class="form-control" name="weixinid" value="{$info['weixinid']}" >
					</div>
					<div class="form-group">
						<label>性别：</label>
						<input <if condition="$info['sex'] eq 1">checked</if> name="sex" type="radio" value="1" > 男
						<input <if condition="$info['sex'] eq 0">checked</if> name="sex" type="radio" value="0" > 女
					</div>
					<div class="form-group">
						<label>QQ号：</label>
						<input class="form-control" name="qq" value="{$info['qq']}" >
					</div>
					<div class="form-group">
						<label>单位：</label>
						<input class="form-control" name="company" value="{$info['company']}" >
					</div>
					<div class="form-group">
						<label>出售：</label>
						<textarea name="cs" class="form-control" rows="20">{$info['cs']}</textarea>
					</div>
					<div class="form-group">
						<label>求购：</label>
						<textarea name="qg" class="form-control" rows="20">{$info['qg']}</textarea>
					</div>
					<div class="form-group">
						<label>地址：</label>
						<input class="form-control" name="address" value="{$info['address']}" >
					</div>
					<div class="form-group">
						<label>省市：</label>
						<div id="city_1">
						<select class="prov form-control" style="width:100px; height:40px; line-height:40px; margin-top:5px;display:inline;" name="province"></select> 
						<select class="city form-control" style="width:100px; height:40px; line-height:40px; margin-top:5px;display:inline;" name="city" disabled="disabled"></select>
						</div>
					</div>
					<div class="form-group">
						<label>介绍：</label>
						<textarea class="form-control" rows="20" name="content">{$info['content']}</textarea>
					</div>
					<div class="form-group">
						<label>产品展示：</label>
						<label>
							<input class="weui_uploader_input" type="file" name="fileimg">
							<input class="form-control" name="desc" value=""  style="width:380px;">
						</label>
					</div>
					<div class="form-group">
						<label>产品展示：</label>
						<label>
							<volist name="photoarr" id="photoarr">
							<p style="text-align:center;">
							<img src="{$photoarr}" onclick="removeimg(this,'{$photoarr}','{$info['id']}')"/><br/>
							{$descarr[$photoarr]}
							</p>
							</volist>
						</label>
					</div>
					<div class="form-group">
						<input class="btn btn-primary" name="submit" type="submit" value="　提　交　"/>
					</div>
				</form>
					<!-- /.table-responsive -->
				</div>
			</div>
		</div>
	</div>
	<!-- /.row -->
</div>
<!-- /#page-wrapper -->

	</div>
	<!-- /#wrapper -->

	<include file="Public/footer" />

	<!-- Morris Charts JavaScript -->
</body>
</html>
<script type="text/javascript" src="__PUBLIC__/city/jquery.cityselect.js"></script>
<script>
$(function() {
	$("#city_1").citySelect({
		nodata: "none",
		required: false,
		<if condition="$info['province']">
			prov:"{$info['province']}",
		</if>

		<if condition="$info['city']">
			city:"{$info['city']}"
		</if>
	});
});
function removeimg(self,filename,id) {
	if(confirm('确定要删除这个图片吗！')) {
		var keys = $(self).parent().index();
		var postdata = {key:keys,filename:filename,id:id};
		var url = '{:U('Address/ajaxremoveimg')}';
		$.post(url,postdata,function(data){
				if(data.code == 1) {
					$(self).parent().remove();
				} else {
					alert('网络故障，删除失败！');
				}
		},'json');
	}
}
</script>
